package com.financing.wap.dao;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.financing.wap.common.Pager;
import com.financing.wap.dto.ProjectLikeDTO;
import com.financing.wap.vo.ProjectLikeVO;
import com.financing.wap.vo.ProjectSubVO;

/**
 * 
 * @ClassName: IProjectLikeDao
 * @Description: 产品收藏接口 
 * @author  qiye
 * @date 2014年11月8日 下午3:44:54
 *
 */
public interface IProjectLikeDao extends IBaseDao<ProjectLikeDTO, Integer> {
	
	/**
	 * 
	 * @Title: projectLikeList
	 * @Description: 查询产品收藏 
	 * @param @param projectLikeDTO
	 * @param @return
	 * @param @throws SQLException   
	 * @return List<ProjectLikeDTO>   
	 * @throws
	 */
	public List<ProjectLikeVO>  projectLikeList(Map<String,Object> map) throws SQLException;
	
	/**
	 * 
	 * @Title: addProjectLike
	 * @Description: 添加产品收藏 
	 * @param @param projectLikeDTO
	 * @param @return
	 * @param @throws SQLException   
	 * @return int   
	 * @throws
	 */
	public int addProjectLike(ProjectLikeDTO projectLikeDTO) throws SQLException;
	
	/**
	 * 
	 * @Title: deleteProjectLike
	 * @Description: 更新产品收藏 
	 * @param @param projectLikeDTO
	 * @param @return
	 * @param @throws SQLException   
	 * @return int   
	 * @throws
	 */
	public int deleteProjectLike(ProjectLikeDTO projectLikeDTO) throws SQLException;
	
	/**
	 * 
	 * @Title: countProjectLike
	 * @Description: 查询产品收藏总数 
	 * @param @param porjectId
	 * @param @return   
	 * @return int   
	 * @throws
	 */
	public int countProjectLike(Integer porjectId);
	
	/**
	 * 
	 * @Title: countProjectLikeForFa
	 * @Description: 查询FA收藏的产品总数 
	 * @param @param faId
	 * @param @return   
	 * @return int   
	 * @throws
	 */
	public int countProjectLikeForFa(ProjectLikeDTO projectLikeDTO);

	public int countProjectLikepType(Map<String, Object> map);
	
	/**
	 * 查询当前用对当前产品的收藏情况
	 */
	public List<ProjectLikeDTO> queryProjectLikeType(Map<String, Object> map);
	/**
	 * 查询产品流水信息
	 */
	public List<ProjectSubVO> queryProjectFlow(Map<String, Object> param);

	public Integer querySubTimesBypId(Integer getpId);

	public List<ProjectLikeVO> queryProjectSubForFa(String uId);

	/**
	 * 查询所有订单流水表条数
	 * @param pId
	 * @return
	 */
	public int countProjectFlow(Integer pId);
	/**
	 * 查询产品对应的最新产品信息的最后更新时间
	 */
	public Date getPrijectLikeUpdateDateByFa(Map<String, Object> param) throws SQLException;
	
}
